package kr.or.kosta.otr.controller.maincontroller;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import kr.or.kosta.otr.service.interestservice.InterestService;
import kr.or.kosta.otr.service.main.MainService;
import kr.or.kosta.otr.vo.CompanyVO;
import kr.or.kosta.otr.vo.InterestCompanyVO;
import kr.or.kosta.otr.vo.NoticeVO;
import kr.or.kosta.otr.vo.UserVO;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class MainController {
	@Resource(name = "MainService")
	MainService mainService;
	
	@RequestMapping(value = "/indexLoad.action")
	public ModelAndView indexLoad() throws SQLException {
		ModelAndView mv=new ModelAndView();
		mv.addObject("mainMap", mainService.getMainCompanies());
		mv.addObject("nvo", mainService.getMainNotice());
		mv.setViewName("index/indexLoad_result");
		return mv;
	}
}
